# config/urls.py
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from apps.deepseek import views as deepseek_views
from apps.dashboard import views as dashboard_views
from apps.credentials import views as credential_views

urlpatterns = [
    # 首页重定向到仪表盘
    path('', TemplateView.as_view(template_name='dashboard/index.html'), name='home'),
    
    # 后台
    path('admin/', admin.site.urls),
    
    # DeepSeek对话页面
    path('deepseek/chat/', TemplateView.as_view(template_name='deepseek/chat.html'), name='deepseek_chat'),
    path('api/deepseek/chat/', deepseek_views.chat_api, name='deepseek_api'),
    
    # 凭证保存API
    path('api/credentials/save/', credential_views.save_credentials, name='save_credentials'),
    
    # 仪表盘页面
    path('dashboard/', dashboard_views.dashboard, name='dashboard'),
    path('api/dashboard/data/', dashboard_views.dashboard_data, name='dashboard_data'),
    
    
]